<template>
	<view>
		<view class="" @click="gotop" >
			<image src="../../static/img/arrow-up.png" mode="widthFix" :style="{bottom}"></image>
		</view>
	</view>
</template>

<script>
	export default {
		name:"xz-go-top",
		props:{
			bottom:{
				type:String,
				default:"120rpx"
			}
			
		},
		data() {
			return {
				
			};
		},
		methods:{
			gotop(){
				uni.pageScrollTo({
					scrollTop:0,
					duration:300
				})
			},
		}
	}
</script>

<style lang="scss">
image{
	width: 64rpx;
	height: 64rpx;
	position: fixed;
	bottom: 120rpx;
	right: 20rpx;
	opacity: 0.8;
	&:active{
		opacity: 1;
	}
}
</style>
